<?php

namespace App\Models;

use App\Traits\BelongsToAccount;
use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

/**
 * 
 *
 * @property int $id
 * @property int $account_id 微信账号id
 * @property string $query_name 查询名称
 * @property string $match_name 评论匹配名称
 * @property array $replys 回复的内容
 * @property int $status 状态 1正常 0禁用 2进行中 3完成 4异常
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Models\WeChatAccount|null $account
 * @method static \Illuminate\Database\Eloquent\Builder|Task filterAccount($accountId)
 * @method static \Illuminate\Database\Eloquent\Builder|Task newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Task newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Task query()
 * @method static \Illuminate\Database\Eloquent\Builder|Task whereAccountId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Task whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Task whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Task whereMatchName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Task whereQueryName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Task whereReplys($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Task whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Task whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class Task extends Model
{
	use HasDateTimeFormatter,BelongsToAccount;
    protected $table = 'task';

    protected $casts = [
        'replys' => 'array',
    ];
    const STATUS_MAP = [
        1 => '正常',
        0 => '禁用',
        2 => '进行中',
        3 => '完成',
        4 => '异常',
    ];

}
